                         _ ____             __   _  _   
     _ __ ___  _ __ ___ | |___ \ _ __ ___  / /_ | || |  
    | '_ ` _ \| '_ ` _ \| | __) | '_ ` _ \| '_ \| || |_ 
    | | | | | | | | | | | |/ __/| | | | | | (_) |__   _|
    |_| |_| |_|_| |_| |_|_|_____|_| |_| |_|\___/   |_|  
         by messiaen (aka frauber)            [v0.1b]
 
        http://sites.google.com/site/messiaen64/Home
               www.youtube.com/user/frauber

/-/-/-/- From MIDI to .m64 /-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/

    This simple tutorial will guide you through the steps required to make an .m64 file
from a MIDI file. First, you'll need an external program that converts from MIDI to MML.
For this tutorial, I will use tinymm, which can be downloaded at SMW Central Tools 
section.
    The MIDI file victory.mid will be used in this example. Just run victory.mid through
tinymm (either using the console or dragging and drop a file there) and you shall get this
output in a file called victory.mid.mml:


    { Ch 01 ===================================== }
    <d+16d+16r8f16f16r8f+16f+16r8g+16f+16g+16a+1^16
    ;
    { Ch 02 ===================================== }
    b16b16r8<c+16c+16r8d+16d+16r8f16d+16f16g1^16
    ;
    { Ch 03 ===================================== }
    o2g+16g+16r8a+16a+16r8b16b16r8<c+16>b16<c+16d+1^16
    ;
    { Ch 10 ===================================== }
    r8>d4d4d4;


   Tinymm has a bug with octave raisers/lowerers, so now just drag and drop the .mml file
to the mml_fix program. All the '<' and '>' will be inverted and the output will be saved
as victory.mml.mml:


    { Ch 01 ===================================== }
    >d+16d+16r8f16f16r8f+16f+16r8g+16f+16g+16a+1^16
    ;
    { Ch 02 ===================================== }
    b16b16r8>c+16c+16r8d+16d+16r8f16d+16f16g1^16
    ;
    { Ch 03 ===================================== }
    o2g+16g+16r8a+16a+16r8b16b16r8>c+16<b16>c+16d+1^16
    ;
    { Ch 10 ===================================== }
    r8<d4d4d4;

 
    Now you have to fix the channel headers by replacing { ch ... } with the command #
followed by the channel number. Remember channels are numbered starting from 0, so this
is how it must goes:

    #0
    >d+16d+16r8f16f16r8f+16f+16r8g+16f+16g+16a+1^16
    ;
    #1
    b16b16r8>c+16c+16r8d+16d+16r8f16d+16f16g1^16
    ;
    #2
    o2g+16g+16r8a+16a+16r8b16b16r8>c+16<b16>c+16d+1^16
    ;
    #9
    r8<d4d4d4;

    
    At this point, the .mml file is already compatible with mml2m64, so if you drag and
drop the text file above a valid .m64 will be produced. However, there are still some things
you'll have to do to make it sound better. First, let me remind you that channel 10 in MIDI
is used for drums/percussion, so remember to assign instrument @127 (drums) to channel #9. 
In the following step, I also assigned random instruments and volume settings:



    #0  v150  @1
    >d+16d+16r8f16f16r8f+16f+16r8g+16f+16g+16a+1^16
    ;
    #1  v150  @2
    b16b16r8>c+16c+16r8d+16d+16r8f16d+16f16g1^16
    ;
    #2  v150  @3
    o2g+16g+16r8a+16a+16r8b16b16r8>c+16<b16>c+16d+1^16
    ;
    #9  @127                  ; drums (originally channel 10)
    r8<d4d4d4;


    After inserting the sequence in the ROM with the Sequence Inserter, you can hear that
this sequence is not to be looped, and that the first channel is on the wrong octave. After
correcting this, here is the final version of it:

   
    -- final victory.mml file --

    ?0          ; don't loop
    w200        ; global volume = 200
    t158        ; tempo = 158 BMP

    #0  v150  @1
    d+16d+16r8f16f16r8f+16f+16r8g+16f+16g+16a+1^16      ; the '>' was removed to lower one octave
    ;
    #1  v150  @2
    b16b16r8>c+16c+16r8d+16d+16r8f16d+16f16g1^16
    ;
    #2  v150  @3
    o2g+16g+16r8a+16a+16r8b16b16r8>c+16<b16>c+16d+1^16
    ;
    #9   v150  @127           ; volume 150, instrument 127 (drums)
    r8<d4d4d4;


    There might be another adjustments you want to do for even better results, but these are 
the basic steps to use a MIDI file.